import request from '@/utils/request'

// 获取用户信息列表
export function userList (params) {
  return request({
    url: '/user/list',
    params
  })
}
//新增员工
export function userAdd (data) {
  return request({
    url: '/user/add',
    method:'post',
    data
  })
}
//编辑员工
export function userEdit (data) {
  return request({
    url: '/user/edit',
    method:'post',
    data
  })
}
//删除员工
export function userRemove (id) {
  return request({
    url: '/user/remove/',
    method:'post',
    data:{
      id
    }
  })
}
//设置用户状态
export function usertatus (id) {
  return request({
    url: '/user/status',
    method:'post',
    data:{
      id
    }
  })
}

export const getUserInfoAPI = () => {
  return request({
    url: '/info',
    method: 'get'
  })
}

export const logoutAPI = () => {
  return request({
    url: '/logout',
    method: 'get'
  })
}
